// 棋盘--植物拖放到规定放置，分成9*5=45等分的独立方块

let app = document.querySelector('#app')
let checkboard = [] //记录生成棋盘45份坐标,是否已经有植物
let appleft = parseInt(window.getComputedStyle(app,null).left)
let appTop = parseInt(window.getComputedStyle(app,null).top)

let locationX = []
let locationY = []
for(let i = 0; i < 9; i++){
    locationX.push(i*80+appleft)
    for(let j = 0; j < 5; j++){
        let div = document.createElement('div')
        div.style.width = '80px'
        div.style.height = '100px'
        div.style.position = 'absolute'
        div.style.left = i*80+'px'
        div.style.top = j*100+'px'
        // div.style.border = '1px solid red'
        div.style.background = '#ccc'
        div.style.opacity = 0
        div.id = 'div'+i+j
        app.appendChild(div)
        checkboard.push({isHave:false,id:'div'+i+j})
    }
}
for(let m = 0; m < 5; m++){
    locationY.push(m*100+appTop)
}

